package com.core.family.admin.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @program: kuntail
 * @description:   文件元数据
 * @author: honglei
 * @create: 2022-06-10 15:52
 */
@Accessors(chain = true)
@TableName("plat_storage")
@Data
public class PlatStorage {


    /*
     *  主键id
     */
    @TableField(value = "id")
    private Integer id;



    /*
     *  文件md5值
     */

    @TableField(value = "file_md5")
    private String fileMd5;

    /*
     *  文件上传后重新命名
     */

    @TableField(value = "file_key")
    private String fileKey;

    /*
     *  原始文件名
     */

    @TableField(value = "file_name",exist = false)
    private String fileName;

    /*
     *  文件类型
     */
    @TableField(value = "file_type")
    private String fileType;

    /*
     *  文件根路径
     */

    @TableField(value = "file_dir")
    private String fileDir;

    /*
     *  文件全路径
     */

    @TableField(value = "file_path")
    private String filePath;

    /*
     *  文件大小
     */
    @TableField(value = "file_length")
    //  private Long fileLength;
    private Long fileLength;

    /*
     *  网络访问路径,
     */

    @TableField(value = "file_url")
    private String fileUrl;

    @TableField(value = "storage_type")
    private String storageType;



    /*
     *  文件状态
     */
    @TableField(value = "status" ,exist = false)
    private Integer status;

    /*
     *  逻辑删标志
     */
    @TableField(value = "is_del")
    private Integer isDel;

    /*
     *
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    private Date createTime;

    /*
     *
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "update_time")
    private Date updateTime;

}
